home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7333 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  50 lines

  1. Path: hamlet.uncg.edu!b_lee2
  2. From: "Bin . Lee" <b_lee2@hamlet.uncg.edu>
  3. Newsgroups: comp.os.msdos.programmer,comp.lang.asm.x86,comp.lang.c
  4. Subject: Urg,ent, keyboard buffer overflow
  5. Date: Sun, 25 Feb 1996 10:58:55 -0500
  6. Organization: The University of North Carolina at Greensboro
  7. Message-ID: <Pine.SOL.3.91.960225103721.16366A-100000@hamlet.uncg.edu>
  8. NNTP-Posting-Host: hamlet.uncg.edu
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11.  
  12.  
  13. Hi, folks:
  14.  
  15. I wrote a DOS program in Borland C++, because my interrupt service routine
  16. block OS for 3 millisecond of every 5 millisecond, I think this cause 
  17. bios no time to serve and check keyboard buffer, which cause keybord buffer
  18. overflow.
  19.  
  20. Two questions:
  21. 1. related to process of bios handler keyboard buffer, when IRQ1 generate 
  22. a interrupt, but has not finished its ISR, can other IRQ, such as IRQ7 
  23. generate a interrupt in between ? How can keyboard buffer overflow happen ?
  24.  
  25. 2. cli and sti will disable and enable all IRQ, is there a instruction which
  26. will only disable and enable one specific IRQ, like IRQ7.
  27.  
  28. structure of my program
  29.  
  30. int main(void)
  31. {
  32.      InstallExternalTimingIRQ7ISR()
  33.  
  34.         while( waitkey() )
  35.     {
  36.         doKeyboardInput_ScrOutout();
  37.     }
  38.         
  39.         ReinstallOldIRQ7ISR();
  40. }
  41. My interrupt happens every 5 ms and program need 3 ms to finish its ISR,
  42. during this time, I use cli and sti to protect its service, how will this 
  43. affect keyboard interrupt ? The interrupt I used is external circuit 
  44. generate 5 ms interrupt connect to IRQ7.
  45.  
  46. Thanks folks, this is urgent for me, please send me a mail.
  47.  
  48.  
  49. Bin  
  50.